import React from "react";
import bixin from "./imgs/bixin.png";
import { useNavigate } from "react-router";
import { MyRouter, router } from "@/router";
import { NavLink } from "react-router-dom";
type propsTypes = {};

function Header(props: propsTypes) {
  const navigator = useNavigate();
  return (
    <div className="h-12 bg-white flex items-center ">
      <div className="mx-auto w-auto flex items-center">
        <img src={bixin} className="w-6 h-6" />
        {router.filter(item=>item.show).map((item: MyRouter,index) => {
          return (
            <NavLink key={index} className="ml-2" to={item.path as string}>
              {item.name}
            </NavLink>
          );
        })}
      </div>

    </div>
  );
}

export default Header;
